package com.cennavi.mineplay.mineplay_data.model;


public class DBConnectionInfo {

	private String driverClass;
	
	private String jdbc;
	
	private String username;
	
	private String password;
	
	private String sql;
	
	private String dbType;
	
	/**
	 * 调用频率，单位是：秒
	 */
	private int frequency;
	
	/**
	 * 数据更新方式：0：新增 1：更改
	 */
	private int updateStyle;

	private int company_id;
	
	private String timeName;
	
	
	public String getTimeName() {
		return timeName;
	}

	public void setTimeName(String timeName) {
		this.timeName = timeName;
	}

	public String getDbType() {
		return dbType;
	}

	public void setDbType(String dbType) {
		this.dbType = dbType;
		
		if ("oracle".equals(dbType)){
			this.setDriverClass("oracle.jdbc.OracleDriver");
		}else if ("sqlserver".equals(dbType)){
			this.setDriverClass("com.microsoft.sqlserver.jdbc.SQLServerDriver");
		}else if ("mysql".equals(dbType)){
			this.setDriverClass("com.mysql.cj.jdbc.Driver");
		}else if ("postgresql".equals(dbType)){
			this.setDriverClass("org.postgresql.Driver");
		}
	}

 

	public int getCompany_id() {
		return company_id;
	}

	public void setCompany_id(int company_id) {
		this.company_id = company_id;
	}

	public String getDriverClass() {
		return driverClass;
	}

	public void setDriverClass(String driverClass) {
		this.driverClass = driverClass;
	}

	public String getJdbc() {
		return jdbc;
	}

	public void setJdbc(String jdbc) {
		this.jdbc = jdbc;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}

	public int getFrequency() {
		return frequency;
	}

	public void setFrequency(int frequency) {
		this.frequency = frequency;
	}

	public int getUpdateStyle() {
		return updateStyle;
	}

	public void setUpdateStyle(int updateStyle) {
		this.updateStyle = updateStyle;
	}
	
	
}
